﻿/*****************************************************************//**
 * @file   VAOneXMLAdaptorSubsystemsBeam.h
 * @brief  VAOne读写SEA梁子系统适配器
 *
 * @author lilongyuan (lilongyuan@diso.cn)
 * @date   2025-02-10
 *********************************************************************/
#ifndef VAONEXMLADAPTORSUBSYSTEMSBEAM_H
#define VAONEXMLADAPTORSUBSYSTEMSBEAM_H

#include "FITKAbstractVAOneXMLAdaptor.h"

namespace Acoustics
{
    class FITKSEASubSysBeam;
}

namespace IO
{
    /**
     * @brief   VAOne读写SEABeam适配器
     * @author  lilongyuan (lilongyuan@diso.cn)
     * @date    2025-02-10
     */
    class FITKVAOneXMLIOAPI VAOneXMLAdaptorSubsystemsBeam : public FITKAbstractVAOneXMLAdaptor
    {
        FITKCLASS(IO, VAOneXMLAdaptorSubsystemsBeam);
    public:
        /**
         * @brief   构造函数
         * @author  lilongyuan (lilongyuan@diso.cn)
         * @date    2025-02-10
         */
        explicit VAOneXMLAdaptorSubsystemsBeam() = default;
        /**
         * @brief   析构函数
         * @author  lilongyuan (lilongyuan@diso.cn)
         * @date    2025-02-10
         */
        ~VAOneXMLAdaptorSubsystemsBeam() = default;
        /**
         * @brief   适配器读数据
         * @return  是否执行成功
         * @author  lilongyuan (lilongyuan@diso.cn)
         * @date    2025-02-10
         */
        virtual bool adaptR() override;
        /**
         * @brief   适配器写数据
         * @return  是否执行成功
         * @author  lilongyuan (lilongyuan@diso.cn)
         * @date    2025-02-10
         */
        virtual bool adaptW() override;
    private:
        /**
         * @brief     读取SEA梁子系统数据接口
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readBeam(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     读取物理属性数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readPhysicalProperty(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     读取损耗因子频谱数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readDamping(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     读取在SEA解决方案的启用状态数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readIncludeInMatrixSolution(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     读取xsea_alias数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readXseaAlias(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     读取ud_mass数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readUdMass(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     读取模态密度数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readUdModal(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     读取modal数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readModal(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     读取子节点数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool readChildNode(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
    private:
        /**
         * @brief     写出SEA梁子系统数据接口
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool writeBeam(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     写出损耗因子频谱数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool writeDamping(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     写出在SEA解决方案的启用状态数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool writeIncludeInMatrixSolution(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     写出xsea_alias数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool writeXseaAlias(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     写出ud_mass数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool writeUdMass(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     写出模态密度数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool writeUdModal(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     写出modal数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool writeModal(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
        /**
         * @brief     写出子节点数据
         * @param[i]  node Beam节点，data SEA梁子系统数据对象
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-11
         */
        bool writeChildNode(rapidxml::xml_node<char>* node, Acoustics::FITKSEASubSysBeam* data);
    };
    Register2FITKIOAdaptorFactory(VAOneXML, Beam, VAOneXMLAdaptorSubsystemsBeam)
}

#endif // VAONEXMLADAPTORSUBSYSTEMSBEAM_H

